﻿using System.Collections.ObjectModel;
using System.Xml.Serialization;

namespace English.Model
{
    [XmlRoot("root")]
    public class TermDefinitions
    {
        [XmlArray("results")]
        [XmlArrayItem("result")]
        public ObservableCollection<TermDefinition> Collection { get; set; }
    }

    public class TermDefinition
    {
        public TermDefinition()
        {
            this.Term = "";
            this.Definition = "";
            this.PartOfSpeech = "";
            this.Example = "";
        }

        [XmlElement("term")]
        public string Term { get; set; }
        [XmlElement("definition")]
        public string Definition { get; set; }

        [XmlElement("partofspeech")]
        public string PartOfSpeech { get; set; }
        [XmlElement("example")]
        public string Example { get; set; }
    }
}
